import React from "react";
import { RouteObject } from "@/routes/interface";
import Layout from "@/layouts";
import lazyLoad from "@/routes/utils/lazyLoad";

const transaction: Array<RouteObject> = [
	{
		element: <Layout />,
		meta: {
			title: "交易管理",
			key: "transaction"
		},
		children: [
			{
				path: "/transaction",
				element: lazyLoad(React.lazy(() => import("@/pages/transactionManagement/index"))),
				meta: {
					title: "交易管理",
					requiresAuth: true,
					key: "transaction",
					icon: ""
				}
			},
			{
				path: "/transaction/detail",
				element: lazyLoad(React.lazy(() => import("@/pages/transactionManagement/Detail"))),
				meta: {
					title: "交易管理",
					requiresAuth: true,
					key: "/transaction/detail",
					icon: ""
				}
			},
			{
				path: "/transaction/deliver",
				element: lazyLoad(React.lazy(() => import("@/pages/transactionManagement/DeliverGoods"))),
				meta: {
					title: "发货",
					requiresAuth: true,
					key: "/transaction/deliver",
					icon: ""
				}
			},
			{
				path: "/transaction/flow",
				element: lazyLoad(React.lazy(() => import("@/pages/transactionManagement/Flow"))),
				meta: {
					title: "物流",
					requiresAuth: true,
					key: "/transaction/flow",
					icon: ""
				}
			}
		]
	}
];

export default transaction;
